Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-uri

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-uri

The URI implementation that is used by VS Code and its extensions

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created

What is vscode-uri?

The vscode-uri npm package provides utilities to handle URIs within VS Code extensions. It allows developers to parse, manipulate, and work with URIs in a way that is consistent with the internal URI handling of Visual Studio Code.

What are vscode-uri's main functionalities?

Parsing URIs

This feature allows developers to parse a string URI into a URI object, enabling easy access to different parts of the URI such as scheme, path, query, and fragment.

const { URI } = require('vscode-uri');
const uri = URI.parse('https://example.com/path?query#fragment');
console.log(uri.scheme); // 'https'

Creating URIs

This feature enables the creation of URI objects from individual components, allowing for dynamic construction of URIs from various parts.

const { URI } = require('vscode-uri');
const uri = URI.from({ scheme: 'https', authority: 'example.com', path: '/path', query: 'query', fragment: 'fragment' });
console.log(uri.toString()); // 'https://example.com/path?query#fragment'

Modifying URIs

This functionality allows for the modification of existing URI objects, which is useful for changing parts of the URI without needing to reconstruct it entirely.

const { URI } = require('vscode-uri');
let uri = URI.parse('https://example.com/path');
uri = uri.with({ path: '/newPath' });
console.log(uri.toString()); // 'https://example.com/newPath'

Other packages similar to vscode-uri

FAQs

Package last updated on 29 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc